#include <wn.h>

// This should be taken care of by <solaris/jni_md.h> but it isn't.
typedef long long int64_t;

#include <jni.h>

#ifdef __cplusplus
extern "C" {
#endif

// This should be declared in <wnutil.h> but it isn't.
void FreeSenseIndex( SnsIndexPtr );

#define WORD_NET_EXCEPTION_CLASS "edu/princeton/cogsci/wn/WordNetException"

jintArray new_ia( JNIEnv* env, int size, int* buffer );
jobjectArray new_sa( JNIEnv* env, int size, char** buffer );

jobject convert_index( JNIEnv* env, jclass ic, IndexPtr is );

jobject Java_edu_princeton_cogsci_wn_ascii_CSynset_lookup
( JNIEnv* env, jclass clazz, jint pos, jint offset, jstring jword );

jobject Java_edu_princeton_cogsci_wn_ascii_CIndex_lookup
( JNIEnv* env, jclass ic, jstring jword, jint pos );

jobject Java_edu_princeton_cogsci_wn_ascii_CIndex_lookupByOffset
( JNIEnv* env, jclass ic, jint pos, jint offset );

jobject Java_edu_princeton_cogsci_wn_ascii_CSenseIndex_lookup
( JNIEnv* env, jclass sic, jstring jSenseKey );

#ifdef __cplusplus
}
#endif

#include <string.h>
#include <malloc.h>
